#pragma once
#include "Token.h"
#include <string>

Token::Token(){
	this->line = 0;
	this->bad = false;
	this->eof = false;
}

Token::Token(int line,const std::string& str):line(line),value(str){
	this->bad = false;
	this->eof = false;
}

Token::~Token(){
}

Token::Token(const Token& token){
	this->line = token.getLine();
	this->value = token.getValue();
	this->bad = token.BadToken();
	this->eof = token.eofToken();
}

const Token& Token::operator=(const Token& token){

	if (this != &token){
		this->line = token.getLine();
		this->value = token.getValue();
		this->bad = token.BadToken();
		this->eof = token.eofToken();
	}

	return *this;
}

int Token::getLine() const{
	return line;
}

const std::string& Token::getValue() const{
	return value;
}

bool Token::BadToken() const{
	return bad;
	}
bool Token::eofToken() const{
	return eof;
	}

void Token::setBadToken(){
	value = "";
	bad = true;
	}
void Token::setEofToken(){
	value = "";
	eof = true;
	}